Skip to content

Experiment reusable ci workflow #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: rewrite-as-mkdocs-plugin
Choose a base branch
from

Conversation

pedro-psb
Copy link
Member

@pedro-psb pedro-psb commented May 15, 2025

Replaces #122
This one is on a pulp-docs branch so I can test the PR on other repositories.

Test PR in pulpcore-selinux: pulp/pulpcore-selinux#83

@pedro-psb pedro-psb force-pushed the experiment-reusable-ci-workflow branch from f7a4e22 to fcb8e70 Compare May 15, 2025 20:15
@pedro-psb pedro-psb force-pushed the experiment-reusable-ci-workflow branch from 02c7ee4 to 8c7aa64 Compare May 15, 2025 20:37
@pedro-psb pedro-psb force-pushed the experiment-reusable-ci-workflow branch from 8c7aa64 to a5fdbf8 Compare May 15, 2025 21:11
@pedro-psb pedro-psb marked this pull request as ready for review May 15, 2025 21:11
- name: "Build Docs"
working-directory: "pulp-docs"
run: |
pulp-docs fetch --dest /tmp/pulp-docs-tmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the --path argument here too? So we don't fetch repositories we already have?

path: pulp-docs
# ref: "rewrite-as-mkdocs-plugin"
# TODO: revert. using this because pulpcore-selinux is not included in rewrite-as-mkdocs-plugin
ref: "experiment-reusable-ci-workflow"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to fetch the tag of the reference we took the reusable workflow from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my surprise, not very easily: actions/toolkit#1264
But there are some workarounds on the thread.

@@ -0,0 +1,65 @@
name: 'Docs CI'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's write proper and safe yaml.
Start with --- end with ... and consistently quote all strings.

working-directory: "pulp-docs"
run: |
pulp-docs fetch --dest /tmp/pulp-docs-tmp
pulp-docs build --path pulp-docs@..:${{ github.event.repository.name }}@..:/tmp/pulp-docs-tmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even think we need handle pulp-docs specially here.

Suggested change
pulp-docs build --path pulp-docs@..:${{ github.event.repository.name }}@..:/tmp/pulp-docs-tmp
pulp-docs build --path ${{ github.event.repository.name }}@..:/tmp/pulp-docs-tmp

Copy link
Member Author

@pedro-psb pedro-psb May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't it will get pulp-docs docs from the /tmp/pulp-docs (actually it wont find it when we filter the fetch).

@pedro-psb pedro-psb force-pushed the experiment-reusable-ci-workflow branch 4 times, most recently from ce66066 to 1005d1f Compare May 19, 2025 17:05
@pedro-psb pedro-psb force-pushed the experiment-reusable-ci-workflow branch from 1005d1f to aa0aa4d Compare May 19, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants